# Maintainer: Adam Jensen <acjensen@gmail.com>
pkgname=libbpf
pkgver=0.0.9
pkgrel=1
pkgdesc="A library for interacting with the Linux kernel's Berkeley Packet Filter (BPF) facility from user space"
url="https://github.com/libbpf/libbpf"
arch="all"
license="GPL-2.0-only"
# No test suite
options="!check"
depends="elfutils"
makedepends="build-base linux-headers elfutils-dev zlib-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/libbpf/libbpf/archive/v$pkgver.tar.gz
	10-consolidate-lib-dirs.patch"

build() {
	cd src
	make NO_PKG_CONFIG=1
}

package() {
	cd src
	make install DESTDIR="$pkgdir"
	cp -R "$builddir/include/uapi" "$pkgdir/usr/include/uapi"
}

sha512sums="d54bbdee6f7ea83ffef3fd0abe07f71644bcf83e5cf4a307fb4e03d885503617f1af2d324cc869f0f01a92bcb58836780a4802ac4db83b9f037ea196edc1131a  libbpf-0.0.9.tar.gz
1f19209278f7feaee27a8211f11851c3fe601e5a5c548c8b1bcf1aae7e17c0fe2933e07a3b5b38115c940949ca4c30ad669c618bad69fe2b3d8d1a4d91fecc1b  10-consolidate-lib-dirs.patch"
